import Components from 'unplugin-vue-components/vite'
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
import VueComponentsAutoImport from 'vite-plugin-components-autoimport'
//组件自动导入
export default function createUnPluginComponents() {
  return Components({
    resolvers: [NaiveUiResolver()],
    customComponentResolvers: [
      VueComponentsAutoImport({
        dir: '/src/components'
      })
    ]
  })
}
